<?php

class m141005_131918_tbl_news extends CDbMigration
{
	public function up()
	{
		$this->createTable('tbl_news', array(
            'id' => 'pk',
            'title' => 'string NOT NULL',
            'slug' => 'string NOT NULL',
            'content' => 'text NOT NULL',
            'author' => 'int NOT NULL',
            'status' => 'int default 0',
            'cat_id' => 'int NOT NULL',
            'created_at' => 'datetime',
            'updated_at' => 'datetime',
        ));
	}

	public function down()
	{
		$this->dropTable('tbl_users');
	}

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}